package org.idtem.UI.dataTypes;

import java.util.Collection;

import org.idtem.component.wordnet.datatypes.DataTypeSynset;
import org.idtem.utils.dataTypes.Token;

public class TokenExtendidoUI extends Token{

	private Collection<DataTypeSynset> synsets = null;
	private DataTypeSynset selectedSynset = null;
	
	public TokenExtendidoUI(Token token, Collection<DataTypeSynset> synsets){
		super(token);
		this.synsets = synsets;
		if (this.synsets != null && this.synsets.size() >= 1)
		{
			this.selectedSynset = ((DataTypeSynset)this.synsets.toArray()[0]);
		}
	}

	public Collection<DataTypeSynset> getSynset() {
		return synsets;
	}

	public void setSynset(Collection<DataTypeSynset> synsets) {
		this.synsets = synsets;
	}
	
	public boolean isSelectedSense(DataTypeSynset synset)
	{
		if (this.selectedSynset == synset)
			return true;
		return false;
	}
		
	public DataTypeSynset getSelectedSynset() {
		return selectedSynset;
	}

	public void setSelectedSynset(DataTypeSynset selectedSynset) {
		this.selectedSynset = selectedSynset;
	}

	@Override
	public String toString()
	{
		return this.getWord();
	}
	




}
